function getDete(type) {
    var date = new Date();
    switch (type) {
        case "y":
            return date.getFullYear();
            break;
        case "m":
            return date.getMonth() + 1;
            break;
        case "d":
            return date.getDate();
            break;
        case "r":
            return date.getTime();
            break;
        case "ym":
            return date.getFullYear() + "/" + (date.getMonth() + 1);
            break;
        case "ymd":
            return date.toLocaleDateString();
            break;
        case "ymds":
            return date.toLocaleString();
            break;
        default:
            return "defind";
    }
}
